package mypodsync.device;

import java.util.HashMap;
import java.util.Map;
import java.util.Timer;

import mypodsync.service.Service;


public class DeviceManager {
    
    private Map<Service, Timer> timers;	 
    private DeviceListener deviceListener;

    public DeviceManager(DeviceListener deviceListener) {
        this.deviceListener = deviceListener;
        this.timers = new HashMap<Service, Timer>();
    }
    
    public void addDevice(Service service) {
        DeviceVerifierTask task = new DeviceVerifierTask(deviceListener, service);
        Timer timer = new Timer(service.getName(), true);
        timer.schedule(task, 500, 10000);
        timers.put(service, timer);
    }
 
	 
}
 
